<div class="am-u-sm-12 widget main-w" >
	{if $notPopup}
	<ol class="am-breadcrumb">
		<li>
			<a href="{:url('/admin/index')}">首页</a>
		</li>
		<li>
			<a href="{:url('/admin/car/index')}">业务管理</a>
		</li>
		<li class="am-active">乘客管理</li>
	</ol>
	{/if}
	<div class="am-u-sm-12 cl-p">
		<form class="am-form tpl-form-border-form tpl-form-border-br" action="" method="get">
			{if input('param.op')}
			{else/}
			<div class="am-u-sm-2">
				<input type="hidden" class="company_id" name="company_id" value="{$Think.get.company_id}" />
				<input type="text" class="am-form-field tpl-form-no-bg  company_name" style="line-height: 21px;" value="{$item.company_name}" placeholder="点击选择公司/单位" readonly="">

			</div>
			{/if}
			<input type="hidden" name="op" value="{$Think.get.op}" />
			<div class="am-u-sm-2">
				<input type="text" class="tpl-form-input" name="name" placeholder="乘客姓名" value="{$Think.get.name}">
			</div>
			<div class="am-u-sm-2">
				<input type="text" class="tpl-form-input" name="phone" placeholder="乘客电话" value="{$Think.get.phone}">
			</div>
			<div class="am-u-sm-2">
				<select name="is_check">
					<option {$Think.get.is_check?:selected} value="0">所有乘客</option>
					<option {if $Think.get.is_check==1}selected{/if} value="1">审核员</option>
					<option {if $Think.get.is_check==9}selected{/if} value="9">非审核员</option>
				</select>
			</div>
			<div class="am-u-sm-4">
				<button type="submit" class="am-btn am-btn-sm am-btn-primary am-radius">查询<i class="am-icon-search"></i></button>

			</div>

		</form>
	</div>
	
	<div style="padding: 10px;" class="am-u-sm-12">
		<form class="am-form tpl-form-border-form tpl-form-border-br" action="outexcel" method="get">
			<input type="hidden"  name="name" value="{$Think.get.name}">
			<input type="hidden"  name="company_id" value="{$Think.get.company_id}">
			<input type="hidden"  name="phone" value="{$Think.get.phone}">
			<input type="hidden"  name="is_check" value="{$Think.get.is_check}">
			
			{if $op == 'search'} {else/} 
			{if $Think.get.filter}
			<div class="am-btn-group am-u-sm-12 am-btn-group-xs cl-p">
				<a href="{:url('index')}" class="am-btn am-btn-default">
					</span> 查看可用乘客</a>
				<button  class="am-btn am-btn-default am-fr" style="float: right;">导出数据</button>
			</div>
			{else/}
			<div class="am-btn-group am-u-sm-12 am-btn-group-xs cl-p">
				<a href="{:url('add')}" class="am-btn am-btn-default"><span class="am-icon-plus"></span> 新增</a>
				<button type="button" class="am-btn am-btn-default delete-multiple" data-method='deleteMultiple'><span class="am-icon-trash-o"></span> 删除</button>
				<!--<button type="button" class="am-btn am-btn-default">短信发送</button>-->
				<a href="{:url('index')}?filter=delete" class="am-btn am-btn-default">查看已删除乘客</a>
				<button class="am-btn am-btn-default am-fr" style="float: right;">导出数据</button>
			</div>
			{/if} 
			{/if}
		</form>
			<table width="100%" class="am-table am-table-compact am-table-bordered am-table-radius am-table-striped am-text-truncate tpl-table-black" id="passenger">
				<thead>
					<tr>
						{if $op == 'search'}
						<th>操作</th>
						{else/}
						<th><input type="checkbox" data-checkall='1' class="check-all" /></th>
						{/if}
						<th>乘客姓名</th>
						<th>电话</th>
						<th>性别</th>
						<th>角色</th>
						<th>余额</th>
						<th>公司额度</th>
						<th>个人额度</th>
						<th>状态</th>
						{if $op == 'search'} {else/}
						<th>操作</th>
						{/if}
					</tr>
				</thead>
				<tbody>
					{foreach $list as $key => $item}
					<tr data-id="{$item.passenger_id}">
						{if $op == 'search'}
						<td data-id="{$item.car_type_id}">
							<div class="tpl-table-black-operation">
								<a href="javascript:;" class="choose" data-id="{$item.car_type_id}" data-type="{:config('base.types')[$item.type]}" data-cartype="{:config('base.car_types')[$item.car_type]}">
									<i class="am-icon-pencil"></i> 选中
								</a>
							</div>
						</td>
						{else/}
						<th><input type="checkbox" class="check-list" /></th>
						{/if}

						<td >
							<a  class="name" href="{:url('detail',['passenger_id'=>$item['passenger_id'] ])}">{$item.name}</a>
						</td>
						<td class="phone">{$item.phone}</td>
						<td>{$item.sex==1?女:男}</td>
						<td>{$item.is_check==1?'审核员':'非审核员'}</td>
						<td>{$item.balance?:'0'}</td>
						<td>{$item.quota?:'暂无公司额度'}</td>
						<td>{$item.personal_quota?:'暂无个人额度'}</td>
						<td class="am-text-{$item.state==9?'danger':'success'}">{$item.state==9?'已禁用':'已启用'}</td>
						{if $op == 'search'} {else/}
						<td>
							<div class="tpl-table-black-operation">
								{if $item.state == 9}
								<a href="javascript:;" class="startusing" data-method="startusing">
									<i class="am-icon-pencil"></i> 启用
								</a>
								{else/}
								<a href="javascript:;" class="tpl-table-black-operation-del forbidden" data-method="forbidden">
									<i class="am-icon-trash"></i> 禁用
								</a>
								{/if}
								<a href="{:url('edit',['passenger_id'=>$item.passenger_id])}{if $Think.get.page}?page={$Think.get.page}{else/}?page=1{/if}">
									<i class="am-icon-pencil"></i> 编辑
								</a>
								<a class="look_order" data-id="{$item.passenger_id}">
									<i class="am-icon-pencil"></i> 查看订单
								</a>
								<a class="resetpassword" data-id="{$item.passenger_id}">
									<i class="am-icon-pencil"></i> 重置密码
								</a>
								<a href="javascript:;" class="tpl-table-black-operation-del delete-list" data-method="delete">
									<i class="am-icon-pencil"></i> 删除
								</a>
							</div>
						</td>
						{/if}
					</tr>
					{/foreach}
					<!-- more data -->
				</tbody>
			</table>
	

		<div class="am-u-lg-12 am-cf">

			<div class="am-fr">
				{$pager}
			</div>
		</div>
	</div>

</div>